﻿using NewsPortal.Domain.PostEntities;
using System.Data.Entity.ModelConfiguration;

namespace NewsPortal.DataAccess.POCO.Config
{
    public class PostCategoryConfig: EntityTypeConfiguration<PostCategory>
    {
        public PostCategoryConfig()
        {
            this.HasKey(p => p.Id);
            this.Property(pc => pc.Title).HasColumnType("nVarchar");
            this.Property(pc => pc.Title).HasUniqueIndexAnnotation("IX_Category_Title", 1);
        }
    }
}
